// 笔试强训25/3/12
// dd爱框框

#include <iostream>
#include <vector>
using namespace std;

int main() {
    int n, x; cin >> n >> x;
    vector<int> nums(n);
    for(auto& e : nums) cin >> e;

    int l = 0, r = n - 1;
    int left = 0, right = -1, count = 0;
    while(right < n)
    {
        if(count < x)
        {
            right++;
            if(right < n)
                count += nums[right];
        }
        else
        {
            while(count - nums[left] >= x)
            {
                count -= nums[left++];
            }
            if(right - left < r - l)
            {
                r = right;
                l = left;
            }
            count -= nums[left++];
        }
    }

    cout << l + 1 << " " << r + 1 << endl;
}
// 64 位输出请用 printf("%lld")